package com.why.remote;

import com.github.pagehelper.PageInfo;
import com.why.dto.NhDto;
import com.why.pojo.GoodsDetail;
import com.why.pojo.ItemDetail;
import com.why.pojo.Laji1;
import com.why.pojo.StoreManagement;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

public interface DepositoryRemote {
    //查询所有物品
    @RequestMapping("/storeManagementAll")
    NhDto<PageInfo<StoreManagement>> storeManagementAll(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("goodsName") String goodsName);
    //增加减少库存
    @RequestMapping("/storeManagementJiaJian")
    NhDto<Boolean> storeManagementJiaJian(@RequestParam("jia") Integer jia, @RequestParam("jian") Integer jian, @RequestParam("id") Integer id);
    //删除物品  在没有外界情况下能删除
    @RequestMapping("/storeManagementDelet")
    NhDto<Boolean> storeManagementDelet(@RequestParam("id")Integer id);
    //增加物品
    @RequestMapping("/goodsNameAdd")
    NhDto<Boolean> goodsNameAdd(@RequestParam("goodsName")String goodsName);
    //按id查询物品
    @RequestMapping("/selectByid")
    NhDto<StoreManagement> selectByid(@RequestParam("id")Integer id);
    //物品状态查询
    @RequestMapping("/selectByItemDetail")
    NhDto<PageInfo<ItemDetail>> selectByItemDetail(@RequestParam("id")Integer id,@RequestParam("goodsNo")Integer goodsNo ,@RequestParam("status")Integer status,@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);
    //删除物品
    @RequestMapping("/deletById")
    NhDto<Boolean> deletById(@RequestParam("id")Integer id);
    //申请物品订单
    @RequestMapping("/shenqing")
    NhDto<Boolean> shenqing(@RequestBody Laji1 laji1);
    //查询所有申请
    @RequestMapping("/goodsDetailAll")
    NhDto<List<GoodsDetail>> goodsDetailAll(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("zhuangtai") Integer zhuangtai);
    //拒绝与否
    @RequestMapping("/insertZhuangtai")
    NhDto<Boolean> insertZhuangtai(@RequestParam("zhuangtai") int zhuangtai, @RequestParam("applyForId") Long applyForId,@RequestParam("bumen") Integer bumen);
    @RequestMapping("/updataStatus")
    NhDto<Boolean> updataStatus(@RequestParam("id")int id, @RequestParam("status") int status);
}
